﻿using System;
using BEGDC.CC.BL.Workflow;

namespace BEGDC.CC.Web.UserControls
{
	/// <summary>
	/// Summary description for AccessControlFactory.
	/// </summary>
	public class AccessControlFactory
	{
		public AccessControlFactory()
		{
			//
			// TODO: Add constructor logic here
			//
		}

		public static AccessControl GetAccessControl(string type)
		{
			switch( type )
			{
				case WorkflowTypes.EV:
					return new EVAccessControl();
					break;
				case WorkflowTypes.CV:
					return new CVAccessControl();
					break;
				case WorkflowTypes.CR:
					return new CRAccessControl();
					break;
				case WorkflowTypes.OCR:
					return new OCRAccessControl();
					break;
				case WorkflowTypes.CO:
					return new COAccessControl();
					break;
				case WorkflowTypes.OCV:
					return new OCVAccessControl();
					break;
				case WorkflowTypes.EBD:
					return new EBDAccessControl();
					break;
				case WorkflowTypes.ESC:
					return new ESCAccessControl();
					break;
				case WorkflowTypes.EBDCV:
					return new EBDCVAccessControl();
					break;
				case WorkflowTypes.ESCCV:
					return new ESCCVAccessControl();
					break;
				default:
					return new AccessControl();
					break;
			}
		}
	}
}
